package com.zbkj.service.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zbkj.common.model.client.digital.CustomVoice;
import com.zbkj.common.model.client.digital.DpVoice;
import com.zbkj.service.dao.client.CustomVoiceDao;
import com.zbkj.service.service.CustomVoiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CustomVoiceServiceImpl extends ServiceImpl<CustomVoiceDao, CustomVoice> implements CustomVoiceService {


    @Autowired
    private  CustomVoiceDao customVoiceDao;

    /**
     * 获取
     * @param userId
     * @return
     */
    @Override
    public Integer countCustomVoiceByUserId(Integer userId) {
        QueryWrapper<CustomVoice> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("is_del", 0)
                .eq("user_id", userId);
        return customVoiceDao.selectCount(queryWrapper);
    }
} 